<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
    <xsl:template match="/">
        <html>
            <head>
                <link href="/css/bootstrap.css" rel="stylesheet" media="screen"/>
                <link href="/css/docs.css" rel="stylesheet" media="screen"/>
                <link href="/css/bootstrap-responsive.css" rel="stylesheet" media="screen"/>
                <meta charset="UTF-8"/>
                <title>Агенты и очереди звонков</title>
            </head>
            <body>
                <div style="margin-top: 20px">
                    <div class="container">
                        <div class="row">
                            <div class="span3 bs-docs-sidebar">
                                <ul class="nav nav-list affix bs-docs-sidenav">
                                    <li>
                                        <a href="/service/agents/and/queues">
                                            <!--<i class="icon-chevron-right"/>-->
                                            Агенты и очереди звонков
                                        </a>
                                    </li>
                                    <li>
                                        <a href="/service/show/hunt/groups">
                                            <!--<i class="icon-chevron-right"/>-->
                                            Подгруппы
                                        </a>
                                    </li>
                                    <li>
                                        <a href="/service/show/call/hist">
                                            Распределение звонков
                                        </a>
                                    </li>
                                    <li class="active dropdown-submenu">
                                        <a tabindex="-1" href="#">Статистика</a>
                                        <ul class="dropdown-menu">
                                            <li>
                                                <a href="/service/show/super/stats?units-count=12&amp;time-unit=hours">
                                                    12 часов
                                                </a>
                                            </li>
                                            <li>
                                                <a href="/service/show/super/stats?units-count=24&amp;time-unit=hours">
                                                    1 день
                                                </a>
                                            </li>
                                            <li>
                                                <a href="/service/show/super/stats?units-count=2&amp;time-unit=days">
                                                    2 дня
                                                </a>
                                            </li>
                                            <li>
                                                <a href="/service/show/super/stats?units-count=7&amp;time-unit=days">
                                                    1 неделя
                                                </a>
                                            </li>
                                            <li>
                                                <a href="/service/show/super/stats?units-count=30&amp;time-unit=days">
                                                    1 месяц
                                                </a>
                                            </li>
                                        </ul>
                                    </li>
                                    <li>
                                        <a href="/service/log/out">
                                            <!--<i class="icon-chevron-right"/>-->
                                            Выход
                                        </a>
                                    </li>
                                </ul>
                            </div>
                            <div class="span9">
                                <div class="page-header">
                                    <h1>Статистика</h1>
                                </div>
                                <!--<h4 style="margin-top:50px">Agents status report</h4>-->
                                <table class="table table-bordered table-striped">
                                    <thead>
                                        <tr>
                                            <th>Номер клиента</th>
                                            <th>Подгруппа</th>
                                            <th>Агент</th>
                                            <th>Время поступлення</th>
                                            <th>Время ответа</th>
                                            <th>Время завершения</th>
                                            <th>Время ожидания</th>
                                            <th>Длительность</th>
                                            <th>Статус</th>
                                        </tr>
                                    </thead>
                                    <tbody>
                                        <xsl:for-each select="/response/calls/call">
                                            <tr>
                                                <td><xsl:value-of select="./@caller"/></td>
                                                <td><xsl:value-of select="./@hunt-group"/></td>
                                                <td><xsl:value-of select="./@answerer"/></td>
                                                <td><xsl:value-of select="./@started"/></td>
                                                <td><xsl:value-of select="./@answered"/></td>
                                                <td><xsl:value-of select="./@completed"/></td>
                                                <td><xsl:value-of select="./@hold-time"/></td>
                                                <td><xsl:value-of select="./@duration"/></td>
                                                <td><xsl:value-of select="./@who-finished"/></td>
                                            </tr>
                                        </xsl:for-each>
                                    </tbody>
                                </table>
                            </div>
                        </div>
                    </div>
                </div>

            </body>
        </html>
    </xsl:template>
</xsl:stylesheet>